package com.hyh.prize.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lww.springcloudapi.entity.TabSaleplanGiftlog;
import com.lww.springcloudapi.entity.TabSaleplanGiftstock;
import com.lww.springcloudapi.entity.parent.ParentEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 销售礼品编码定义表
 * </p>
 *
 * @author SHEN
 * @since 2021-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor //无参构造
@Accessors(chain = true) //链式编程
@ApiModel(value="TabSaleplanGiftcode对象", description="销售礼品编码定义表")
public class TabSaleplanGiftcode extends ParentEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "礼品编码")
    @TableField("GIFTCODE")
    private String giftcode;

    @ApiModelProperty(value = "礼品名称")
    @TableField("GIFTNAME")
    private String giftname;

    @ApiModelProperty(value = "地市代码")
    @TableField("AREAID")
    private String areaid;

    @ApiModelProperty(value = "营销活动标识（tab_code表codetype=’ SalePlanId’）")
    @TableField("SALEPLANID")
    private String saleplanid;

    @ApiModelProperty(value = "礼品类型（tab_code表")
    @TableField("GIFTTYPE")
    private String gifttype;

    @ApiModelProperty(value = "奖品等级（1-6）")
    @TableField("PRIZELEVEL")
    private Integer prizelevel;

    @ApiModelProperty(value = "生效时间")
    @TableField("BEGINTIME")
    private Date begintime;

    @ApiModelProperty(value = "失效时间")
    @TableField("ENDTIME")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
//    @JSONField(format = "yyyy-MM-dd")
    private Date endtime;

    @ApiModelProperty(value = "操作员")
    @TableField("OPTRID")
    private String optrid;

    @ApiModelProperty(value = "受理点")
    @TableField("ACPTSITEID")
    private String acptsiteid;

    @ApiModelProperty(value = "操作时间")
    @TableField("OPTRDATE")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
//    @JSONField(format = "yyyy-MM-dd")
    private Date optrdate;

    @ApiModelProperty(value = "备注")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "剩余库存")
    @TableField(exist = false)
    private String number;

    @ApiModelProperty(value = "已领取数量")
    @TableField(exist = false)
    private String ynumber;

    @ApiModelProperty(value = "新增数量")
    @TableField(exist = false)
    private String xNumber;

    @ApiModelProperty(value = "礼品类型")
    @TableField(exist = false)
    private String typeName;

}
